package com.example.course.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 题库数据传输对象
 *
 * @author Jasmine-drs
 * @date 2025-04-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "TopicDTO", description = "题库数据传输对象")
public class TopicDTO {

	@ApiModelProperty("主键")
	private Integer id;

	@NotBlank(message = "[题目]不能为空")
	@Size(max = 1024, message = "题目长度不能超过1024")
	@ApiModelProperty("题目")
	private String title;

	@NotNull(message = "[题目类型]不能为空")
	@ApiModelProperty("题目类型，0单选题，1填空题...")
	private Integer type;

	@Size(max = 255, message = "选项长度不能超过255")
	@ApiModelProperty("选项1")
	private String topicA;

	@Size(max = 255, message = "选项长度不能超过255")
	@ApiModelProperty("选项2")
	private String topicB;

	@Size(max = 255, message = "选项长度不能超过255")
	@ApiModelProperty("选项3")
	private String topicC;

	@Size(max = 255, message = "选项长度不能超过255")
	@ApiModelProperty("选项4")
	private String topicD;

	@NotBlank(message = "[答案]不能为空")
	@Size(max = 255, message = "答案长度不能超过255")
	@ApiModelProperty("答案")
	private String answer;
} 